
$(document).ready(function(){	   
	//Hide the slides menus.
	$("#slideMenuSupport").hide();	
	$("#slideMenuProduct").hide();	
	$("#slideMenuSolutions").hide();	
	//$("#slideMenuDownload").hide();	
	$("#slideMenuInformation").hide();	
	$("#slideMenuBlog").hide();		
	$("#mainRightCompareTru").hide();
	$("#mainLeft  #supportAdvancedSearch").hide();
	$("#mainLeftBeta #box #technical").hide();
	$("#mainLeftBeta #box #services").hide();


/*// Slider
	if ($("#slider").length > 0){

	$("#slider").slider({
			value:0,
			min: 0,
			max: 11000,
			step: 100,
			slide: function(event, ui) {
				if(ui.value==11000){
					$("#amount").val('m�s de 10.000');
					$("#sliderTooltip").html('m�s de 10.000');
				}else{
					$("#amount").val(ui.value);
					$("#sliderTooltip").html(ui.value);					
				}
			}
		});
	$("#amount").val($("#slider").slider("value"));
	
	$("#sliderTooltipArrow").hide();
	$("#slider a").mouseover(function(e) {
				$("#sliderTooltipArrow").show();
				$("#sliderTooltipArrow").css("margin-left",function () {	
																
					var IE = document.all?true:false;					
					if (IE) { // grab the x-y pos.s if browser is IE
						return parseInt(event.clientX- 220);						
					}else { // grab the x-y pos.s if browser is NS
						return parseInt((e.pageX- (parseInt($("#sliderTooltipArrow").css("width"))/2)) - 200);
					}											
   					 
  				});

	});						  
	
			
	$("#sliderTops").slider({
			range: true,
			min: 0,
			max: 8000,
			values: [300, 6000],
			step: 50,
			slide: function(event, ui) {				
					$("#sliderTooltipDown").html(ui.value + ' � ');	
					$("#amountTops").val(ui.values[0] + ' � - ' + ui.values[1]+ ' � ');

			}
		});	
	$("#amountTops").val($("#sliderTops").slider("values", 0) + ' � - ' + $("#sliderTops").slider("values", 1)+ ' � ');

			$("#sliderTooltipDown").html('300' + ' � ');	
			$("#sliderTops a").mouseover(function(e) {
						$("#sliderTooltipArrowDown").show();
						$("#sliderTooltipArrowDown").css("margin-left",function () {	
																		
							var IE = document.all?true:false;					
							if (IE) { // grab the x-y pos.s if browser is IE
								return parseInt(event.clientX-120);						
							}else { // grab the x-y pos.s if browser is NS
								return parseInt((e.pageX- (parseInt($("#sliderTooltipArrowDown").css("width"))/2)) - 100);
							}											
							 
						});
		
			});
	}*/

	 	$("#menuTop li.indexMenu").hover(
		function () {			
			$("#slideMenuProduct").fadeOut();
			$("#slideMenuDownload").fadeOut();
			$("#slideMenuSupport").fadeOut();
			$("#slideMenuInformation").fadeOut();
			$("#slideMenuBlog").fadeOut();
		},
		function () {}
	);
	 //Show the correct slide menu and hide the other in case they where displayed	
	 	
	$(".TranslateItemMenu").click(
		function () {		
		$("#slideMenuTranslate").fadeIn(); 
		}
	);
	$("#close-translate").click(
		function () {		
		$("#slideMenuTranslate").fadeOut(); 
		}
	);
	

	
	$("#menuTop li.shop, #menuTop li.blogMenu").hover(
		function () {			
			$("#slideMenuProduct").fadeOut();
			$("#slideMenuDownload").fadeOut();
			$("#slideMenuSupport").fadeOut();
			$("#slideMenuInformation").fadeOut();
			$("#slideMenuBlog").fadeOut();
		},
		function () {}
	);
	$("#menuTop li.productItemMenu span").hover(
		function () {
			$("#slideMenuProduct").fadeIn();
			//$("#slideMenuDownload").hide();
			 $('#slideMenuDownload').fadeOut();
			$("#slideMenuSupport").fadeOut();
			$("#slideMenuInformation").fadeOut();
			$("#slideMenuBlog").fadeOut();
		},
		function () {}
	);
	$("#menuTop li.downloadMenu span").hover(
		function () {
					
			$("#slideMenuProduct").fadeOut();
			//$("#slideMenuDownload").show();
			$("#slideMenuSolutions").fadeOut();
			$("#slideMenuSupport").fadeOut();
			$("#slideMenuInformation").fadeOut();
			$("#slideMenuBlog").fadeOut();
			$('#slideMenuDownload').fadeIn('fast');
			var timeoutID = window.setTimeout($('#slideMenuDownload').css('filter',' progid:DXImageTransform.Microsoft.dropShadow(color=#818181, offX=5, offY=5, positive=true)'), 5000);
			window.clearTimeout(timeoutID);
			
		},
		function () {}
	);
	$("#menuTop li.supportMenu span").hover(
		function () {					
			$("#slideMenuProduct").fadeOut();
			$("#slideMenuDownload").fadeOut();
			$("#slideMenuSupport").fadeIn();
			$("#slideMenuInformation").fadeOut();
			$("#slideMenuBlog").fadeOut();
			$("#slideMenuSolutions").fadeOut();
		},
		function () {}
	);
	$("#menuTop li.informationMenu span").hover(
		function () {
					
			$("#slideMenuProduct").fadeOut();
			$("#slideMenuDownload").fadeOut();
			$("#slideMenuSupport").fadeOut();
			$("#slideMenuInformation").fadeIn();
			$("#slideMenuBlog").fadeOut();
		},
		function () {}
	);
	$("#menuTop li.blogMenu span").hover(
		function () {
					
			$("#slideMenuProduct").fadeOut();
			$("#slideMenuDownload").fadeOut();
			$("#slideMenuSupport").fadeOut();
			$("#slideMenuInformation").fadeOut();
			$("#slideMenuBlog").fadeIn();
		},
		function () {}
	);	
	//The slide menus are hidden whenever we enter other layers of the webpage
	$("#wrapper").hover(								
		function () {			
			$("#slideMenuProduct").fadeOut();
			$("#slideMenuDownload").fadeOut();
			$("#slideMenuSupport").fadeOut();
			$("#slideMenuInformation").fadeOut();
			$("#slideMenuBlog").fadeOut();
			$("#slideMenuSolutions").fadeOut();
			//closeAS();
				});
	$("#header").hover(
		function () {
			$("#slideMenuProduct").fadeOut();
			$("#slideMenuDownload").fadeOut();
			$("#slideMenuSupport").fadeOut();
			$("#slideMenuInformation").fadeOut();
			$("#slideMenuBlog").fadeOut();	
			$("#slideMenuSolutions").fadeOut();
			//closeAS();
		});
	$("#container_download").hover(
		function () {
			$("#slideMenuProduct").fadeOut();
			$("#slideMenuDownload").fadeOut();
			$("#slideMenuSupport").fadeOut();
			$("#slideMenuInformation").fadeOut();
			$("#slideMenuBlog").fadeOut();		
			$("#slideMenuSolutions").fadeOut();
			//closeAS();
			});
	
	$("#menuTop li.solutionsMenu span").hover(
		function () {			
			$("#slideMenuSolutions").fadeIn();
		},
		function () {}
	);	
	
	
	//Product detail Page. Apply to selected radio button a special styles	
	$("#hproductRight .radio").mousedown(function() {
		$(this).children("input").attr("checked", "checked"); 
		$("#hproductRight .radioActive").addClass("radio").removeClass("radioActive");
		$(this).addClass("radioActive");	
	});

	
	//Hide the divs of the tabs not selected by default
	$("#mainLeftDown #tabContentTechnic").hide();
	$("#mainLeftDown #tabContentOpinion").hide();
	$("#mainLeftDown #tabContentCompare").hide();
	$("#mainLeftDown #tabContentChar").hide();
	
	
	var lisaux=$("#mainLeftDown #detailTapMenu").find("li");//Elements li of the tab menu
	var divsaux=$("#mainLeftDown .tabs");//Divs with the content of each tab section	
	//Product detail Page. Functionality of the tabMenu
	$("#mainLeftDown #detailTapMenu li").mousedown(function() {
																
		  $idActual=$(this).attr("id");		
		  //Change the style of the selected and deselected tabs
		  $("#detailTapMenu li a").removeClass("selected");
		  $("#detailTapMenu li a").addClass("tab");
		  $(this).find("a").removeClass();	  
		  $(this).find("a").addClass("selected");	
		  
		  //Find the index of the selected tab. Show the div with the same index and hide the others
		  
		  $key=0;
		  $.each(lisaux,function(index,value){	
			if(lisaux[index].id==$idActual){
				$key=index;	
			}
		});
		$.each(divsaux,function(index,value){	
			if(index==$key){	
				$('#'+divsaux[index].id).fadeIn("slow");	
			}else{
				$('#'+divsaux[index].id).hide();	
			}
		});
	
	});
	
	
		//Technologies down menu
	var lis=$("#technologiesDown #menu").find("div");//Elements li of the tab menu
	var divs=$("#technologiesDown .tabs");//Divs with the content of each tab section	
	
	
	
	//Product detail Page. Functionality of the tabMenu
	$("#technologiesDown #menu div").mousedown(function() {
		  $idActual=$(this).attr("id");		
		  //Change the style of the selected and deselected tabs
		  $("#technologiesDown #menu div").removeClass("selected");
		 // $("#detailTapMenu  #menu div").addClass("tab");
		  $(this).removeClass();	  
		  $(this).addClass("selected");	
		  
		  //Find the index of the selected tab. Show the div with the same index and hide the others
		  $key=0;
		  $.each(lis,function(index,value){	
			if(lis[index].id==$idActual){
				$key=index;	
			}
		});
		$.each(divs,function(index,value){						
			if(index==$key){	
				$('#'+divs[index].id).fadeIn("slow");	
			}else{
				$('#'+divs[index].id).hide();	
			}
		});
	
	});


		 
	/*Support activation register*/
	$("#mainLeft #tabActivate").hide();
	$("#mainLeft #tabRegister").hide();
	var lis1=$("#detailTapMenu").find("li");//Elements li of the tab menu
	var divs1=$("#mainLeft .tabs");//Divs with the content of each tab section	
		//Product detail Page. Functionality of the tabMenu
	$("#mainLeft #detailTapMenu li").mousedown(function() {
		  $idActual=$(this).attr("id");		
		  //Change the style of the selected and deselected tabs
		  $("#detailTapMenu li a").removeClass("selected");
		  $("#detailTapMenu li a").addClass("tab");
		  $(this).find("a").removeClass();	  
		  $(this).find("a").addClass("selected");	
		  
		  //Find the index of the selected tab. Show the div with the same index and hide the others
		  $key=0;
		  $.each(lis1,function(index,value){	
			if(lis1[index].id==$idActual){
				$key=index;	
			}
		});
		$.each(divs1,function(index,value){		
							  
			if(index==$key){	
				$('#'+divs1[index].id).fadeIn("slow");	
			}else{
				$('#'+divs1[index].id).hide();	
			}
		});
	
	});
	/*End Support activation register*/
	
	/*Technologies*/
		var lisTec=$(" .technologies #detailTapMenu").find("li");//Elements li of the tab menu
	var divsTec=$(" .technologies .tabs2");//Divs with the content of each tab section	
		//Product detail Page. Functionality of the tabMenu
		
	$(" .technologies #detailTapMenu li").mousedown(function() {
															 
		  $idActual=$(this).attr("id");		
		  //Change the style of the selected and deselected tabs
		  $("#detailTapMenu li a").removeClass("selected");
		  $("#detailTapMenu li a").addClass("tab");
		  $(this).find("a").removeClass();	  
		  $(this).find("a").addClass("selected");	
		  
		  //Find the index of the selected tab. Show the div with the same index and hide the others
		  $key=0;
		  $.each(lisTec,function(index,value){	
			if(lisTec[index].id==$idActual){
				$key=index;	
			}
		});
		$.each(divsTec,function(index,value){		
							  
			if(index==$key){	
				$('#'+divsTec[index].id).fadeIn("slow");	
			}else{
				$('#'+divsTec[index].id).hide();	
			}
		});
	
	});
	/*End technologies*/

	
	
		//Product compare Page. Show the div that corresponds with the selected menu item
	$("#mainLeftCompare li").mousedown(function() {
		$("#mainRightCompareSecure").hide();
		$("#mainRightCompareTru").show();		
	});
	
	//Product compare Page. Apply to selected checkbox a special style
	$("#mainLeftCompare .checkBox input").click(function() {
		$(this).attr("checked",$(this).is(":checked") == false );	
		});	
	$("#mainLeftCompare .checkBox").mousedown(function() {	
		$("#mainLeftCompare .checkActive").addClass("checkBox").removeClass("checkActive");
		$(this).addClass("checkActive");	
		$(this).children("input").attr("checked",$(this).children("input").is(":checked") == false );
	});
	
	//Renew License Page. Apply to selected radioButton a special style
	$("#mainLeft #radios .checkBox").mousedown(function() {	
		$("#mainLeft #radios .checkActive").addClass("checkBox").removeClass("checkActive");
		$(this).addClass("checkActive");	
		$(this).children("input").attr("checked",$(this).children("input").is(":checked") == false );
	});
	$("#mainLeft #radios .checkBox2").mousedown(function() {	
		$("#mainLeft #radios .checkActive2").addClass("checkBox2").removeClass("checkActive2");
		$(this).addClass("checkActive2");	
		$(this).children("input").attr("checked",$(this).children("input").is(":checked") == false );
	});	
	
	//Support form. Apply to selected radioButton a special style
	$("#mainLeft #supportHelpText #form .smiliesH").mousedown(function() {	
		$("#mainLeft #supportHelpText #form div").removeClass("selected");
		$(this).addClass("selected");	
		$(this).children("input").attr("checked",$(this).children("input").is(":checked") == false );
		$('#mainLeft #supportHelpText #form .smiliesH img').attr("src",function() {return "img/supportSmilieHappyH.png";});	
		$('#mainLeft #supportHelpText #form .smiliesS img').attr("src",function() {return "img/supportSmilieSad.gif";});	
		$('#mainLeft #supportHelpText #form .smiliesA1 img').attr("src",function() {return "img/supportHelpUpArrow.png";});		
		$('#mainLeft #supportHelpText #form .smiliesA2 img').attr("src",function() {return "img/supportHelpUpArrow.png";});			
	});
	
	$("#mainLeft #supportHelpText #form .smiliesS").mousedown(function() {	
		$("#mainLeft #supportHelpText #form div").removeClass("selected");
		$(this).addClass("selected");	
		$(this).children("input").attr("checked",$(this).children("input").is(":checked") == false );
		$('#mainLeft #supportHelpText #form .smiliesS img').attr("src",function() {return "img/supportSmilieSadH.png";});	
		$('#mainLeft #supportHelpText #form .smiliesH img').attr("src",function() {return "img/supportSmilieHappy.gif";});	
		$('#mainLeft #supportHelpText #form .smiliesA1 img').attr("src",function() {return "img/supportHelpUpArrow.png";});	
		$('#mainLeft #supportHelpText #form .smiliesA2 img').attr("src",function() {return "img/supportHelpUpArrow.png";});			
	});
	
	$("#mainLeft #supportHelpText #form .smiliesA1").mousedown(function() {	
		$("#mainLeft #supportHelpText #form div").removeClass("selected");
		$(this).addClass("selected");	
		$(this).children("input").attr("checked",$(this).children("input").is(":checked") == false );
		$('#mainLeft #supportHelpText #form .smiliesA1 img').attr("src",function() {return "img/supportHelpUpArrowH.png";});	
		$('#mainLeft #supportHelpText #form .smiliesH img').attr("src",function() {return "img/supportSmilieHappy.gif";});	
		$('#mainLeft #supportHelpText #form .smiliesS img').attr("src",function() {return "img/supportSmilieSad.gif";});	
		$('#mainLeft #supportHelpText #form .smiliesA2 img').attr("src",function() {return "img/supportHelpUpArrow.png";});			
	});
	$("#mainLeft #supportHelpText #form .smiliesA2").mousedown(function() {	
		$("#mainLeft #supportHelpText #form div").removeClass("selected");
		$(this).addClass("selected");	
		$(this).children("input").attr("checked",$(this).children("input").is(":checked") == false );
		$('#mainLeft #supportHelpText #form .smiliesA2 img').attr("src",function() {return "img/supportHelpUpArrowH.png";});	
		$('#mainLeft #supportHelpText #form .smiliesH img').attr("src",function() {return "img/supportSmilieHappy.gif";});	
		$('#mainLeft #supportHelpText #form .smiliesS img').attr("src",function() {return "img/supportSmilieSad.gif";});	
		$('#mainLeft #supportHelpText #form .smiliesA1 img').attr("src",function() {return "img/supportHelpUpArrow.png";});			
	});	
	
	//Support search. Display, hide advanced search box
	$("#mainLeft  #supportSearch .rightText").mousedown(function() {	
		 $('#mydiv').hasClass('foo')
		 if($("#mainLeft  #supportSearch .rightText").hasClass('selected')){
		 		 $("#mainLeft  #supportSearch .rightText").removeClass("selected");
				 $("#mainLeft  #supportAdvancedSearch").hide();
				 $("#mainLeft  #supportSearch .rightText img").attr("src","img/searchDownArrow.png");
				 
		 }else{
			$("#mainLeft  #supportSearch .rightText").addClass("selected");	
			$("#mainLeft  #supportAdvancedSearch").show();
			$("#mainLeft  #supportSearch .rightText img").attr("src","img/searchUpArrow.png");
			
		 }
	});	
	
	//Support Index v1 para web Antigua
	$("#mainLeft #productSelection, #wrapper #menuSelect").change(function(){					
		if ( ($("#mainLeft #productSelection").val()==2) || ($("#wrapper #menuSelect").val()==2)  ){			
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PGP2011?idSolucion=163&idProducto=143&Tipo=cg';
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/global-protection';
		}else if ( ($("#mainLeft #productSelection").val()==3) || ($("#wrapper #menuSelect").val()==3) ){
			if($("#language").val()==1)				
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PIS2011.aspx?idSolucion=164&idProducto=144&Tipo=cg';	
			else 
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/internet-security';
		}else if ( ($("#mainLeft #productSelection").val()==4) || ($("#wrapper #menuSelect").val()==4)){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PIN2011.aspx?idSolucion=165&idProducto=145&Tipo=cg';	
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/internet-security-for-netbooks';	
		}else if ( ($("#mainLeft #productSelection").val()==5) || ($("#wrapper #menuSelect").val()==5)){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PAP2011.aspx?idSolucion=166&idProducto=146&Tipo=cg';	
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/antivirus-pro';			
		}else if ( ($("#mainLeft #productSelection").val()==6) || ($("#wrapper #menuSelect").val()==6)){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PGP2010?idSolucion=157&idProducto=135&Tipo=cg';			
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/global-protection-2010';		
		}else if ( ($("#mainLeft #productSelection").val()==7) || ($("#wrapper #menuSelect").val()==7)){
			if($("#language").val()==1)
				window.location = 	'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PAP2010.aspx?idSolucion=159&idProducto=137&Tipo=cg';			
			else
				window.location = 	'http://www.pandasecurity.com/spain/homeusers/support/antivirus-pro-2010';		
		}else if ( ($("#mainLeft #productSelection").val()==8) || ($("#wrapper #menuSelect").val()==8)){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PIS2010.aspx?idSolucion=158&idProducto=136&Tipo=cg';	
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/internet-security-2010';
		}else if ( ($("#mainLeft #productSelection").val()==9) || ($("#wrapper #menuSelect").val()==9)){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PAF2010.aspx?idSolucion=160&idProducto=138&Tipo=cg';	
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/antivirus-for-netbooks';	
		}else if ( ($("#mainLeft #productSelection").val()==10) || ($("#wrapper #menuSelect").val()==10)){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PGP2009.aspx?idSolucion=148&idProducto=125&Tipo=cg';			
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/global-protection-2009';			
		}else if ( ($("#mainLeft #productSelection").val()==11) || ($("#wrapper #menuSelect").val()==11)){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PIS2009.aspx?idSolucion=149&idProducto=126&Tipo=cg';		
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/internet-security-2009';		
			
		}else if ( ($("#mainLeft #productSelection").val()==12) || ($("#wrapper #menuSelect").val()==12)){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PAP2009.aspx?idSolucion=150&idProducto=127&Tipo=cg';			
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/antivirus-pro-2009';			
		}
		
		else if ( ($("#mainLeft #productSelection").val()==13) || ($("#wrapper #menuSelect").val()==13) ){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PAV2008FW.aspx?idSolucion=143&idProducto=119&Tipo=cg';		
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/panda-antivirus-firewall-2008';		
		}else if ( ($("#mainLeft #productSelection").val()==14) || ($("#wrapper #menuSelect").val()==14)){
			if($("#language").val()==1)
			window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PAV2008.aspx?idSolucion=144&idProducto=120&Tipo=cg';		
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/panda-antivirus-2008';		
		}else if ( ($("#mainLeft #productSelection").val()==15) || ($("#wrapper #menuSelect").val()==15)){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PIS2008?idSolucion=142&idProducto=118&Tipo=cg';		
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/panda-internet-security-2008';			
		}else if ( ($("#mainLeft #productSelection").val()==16) || ($("#wrapper #menuSelect").val()==16)){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PAVMAC.aspx?idSolucion=167&idProducto=147&Tipo=cg';		
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/antivirus-for-mac';			
		}else if ( ($("#mainLeft #productSelection").val()==17) || ($("#wrapper #menuSelect").val()==17)){
			if($("#language").val()==1)
				window.location = 'http://www.cloudantivirus.com/forum/index.jspa?utm_source=websoporte&utm_medium=CloudAV&utm_term=foroCloudAV&utm_content=foroCloudAV&utm_campaign=foroCloudAV';		
			else
				window.location = 'http://www.cloudantivirus.com/forum/index.jspa?utm_source=websoporte&utm_medium=CloudAV&utm_term=foroCloudAV&utm_content=foroCloudAV&utm_campaign=foroCloudAV';			
		} 
	
	});
	
	
			//Support Index v1 para web Antigua
	$("#menuTop #menuSelect").change(function(){					
		if (($("#menuTop #menuSelect").val()==2)){
			
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PGP2011?idSolucion=163&idProducto=143&Tipo=cg';
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/global-protection';
		}else if ( ($("#menuTop #menuSelect").val()==3)){
			if($("#language").val()==1)				
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PIS2011.aspx?idSolucion=164&idProducto=144&Tipo=cg';	
			else 
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/internet-security';
		}else if (($("#menuTop #menuSelect").val()==4)){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PIN2011.aspx?idSolucion=165&idProducto=145&Tipo=cg';	
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/internet-security-for-netbooks';	
		}else if ( ($("#menuTop #menuSelect").val()==5)){
				if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PAP2011.aspx?idSolucion=166&idProducto=146&Tipo=cg';	
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/antivirus-pro';			
		}else if ( ($("#menuTop #menuSelect").val()==6)){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PGP2010?idSolucion=157&idProducto=135&Tipo=cg';			
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/global-protection-2010';	
		}else if ( ($("#menuTop #menuSelect").val()==7)){
			if($("#language").val()==1)
				window.location = 	'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PIS2009.aspx?idSolucion=149&idProducto=126&Tipo=cg';			
			else
				window.location = 	'http://www.pandasecurity.com/spain/homeusers/support/troubleshooter/nh-PIS2009.aspx?idSolucion=149&idProducto=126&Tipo=cg';		
		}else if (($("#menuTop #menuSelect").val()==8)){
			if($("#language").val()==1)
				window.location = 	'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PAP2010.aspx?idSolucion=159&idProducto=137&Tipo=cg';			
			else
				window.location = 	'http://www.pandasecurity.com/spain/homeusers/support/antivirus-pro-2010';		
		}else if (($("#menuTop #menuSelect").val()==9)){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PAF2010.aspx?idSolucion=160&idProducto=138&Tipo=cg';	
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/antivirus-for-netbooks';	
		}else if (($("#menuTop #menuSelect").val()==10)){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PGP2009.aspx?idSolucion=148&idProducto=125&Tipo=cg';			
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/global-protection-2009';	
		}else if (($("#menuTop #menuSelect").val()==11)){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PIS2009.aspx?idSolucion=149&idProducto=126&Tipo=cg';		
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/internet-security-2009';	
			
		}else if (($("#menuTop #menuSelect").val()==12)){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PAP2009.aspx?idSolucion=150&idProducto=127&Tipo=cg';			
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/antivirus-pro-2009';		
		}else if (($("#menuTop #menuSelect").val()==13)){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PAV2008FW.aspx?idSolucion=143&idProducto=119&Tipo=cg';		
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/panda-antivirus-firewall-2008';		
		}else if (($("#menuTop #menuSelect").val()==14)){
			if($("#language").val()==1)
			window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PAV2008.aspx?idSolucion=144&idProducto=120&Tipo=cg';		
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/panda-antivirus-2008';	
		}else if (($("#menuTop #menuSelect").val()==15)){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PIS2008?idSolucion=142&idProducto=118&Tipo=cg';		
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/panda-internet-security-2008';					
		}else if ( ($("#mainLeft #productSelection").val()==16) || ($("#wrapper #menuSelect").val()==16)){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/homeusers/support/troubleshooter/nh-PAVMAC.aspx?idSolucion=167&idProducto=147&Tipo=cg';		
			else
				window.location = 'http://www.pandasecurity.com/spain/homeusers/support/antivirus-for-mac';			
		}
	
	});
	
	//Support Index v1 para web Antigua
	
	
		
	$("#wrapper #menuSelectEnterprise").change(function(){					
		if ( ($("#wrapper #menuSelectEnterprise").val()==2)  ){			
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/enterprise/support/cloud-office-protection';
			else
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/cloud-office-protection';
		}else if ( ($("#wrapper #menuSelectEnterprise").val()==3) ){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/enterprise/support/cloud-internet-protection';
			else 
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/cloud-internet-protection';
		}	else if ( ($("#wrapper #menuSelectEnterprise").val()==4) ){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/enterprise/support/cloud-email-protection';
			else 
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/cloud-email-protection';
		}	else if ( ($("#wrapper #menuSelectEnterprise").val()==5) ){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/enterprise/support/enterprise-business';
			else 
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/enterprise-business';
		}	else if ( ($("#wrapper #menuSelectEnterprise").val()==6) ){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/enterprise/support/business-with-exchange';
			else 
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/business-with-exchange';
		}	else if ( ($("#wrapper #menuSelectEnterprise").val()==7) ){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/enterprise/support/desktops';
			else 
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/desktops';
		}	else if ( ($("#wrapper #menuSelectEnterprise").val()==8) ){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/enterprise/support/file-servers';
			else 
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/file-servers';
		}	else if ( ($("#wrapper #menuSelectEnterprise").val()==9) ){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/enterprise/support/gatedefender-performa';
			else 
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/gatedefender-performa';
		}	else if ( ($("#wrapper #menuSelectEnterprise").val()==10) ){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/enterprise/support/gatedefender-integra';
			else 
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/gatedefender-integra';
		}	
	});	
	
	

	$("#menuSelectEnterpriseSlide").change(function(){					
		if ( ($("#menuSelectEnterpriseSlide").val()==2)  ){			
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/cloud-office-protection';
			else
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/cloud-office-protection';
		}else if ( ($("#menuSelectEnterpriseSlide").val()==3) ){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/cloud-internet-protection';
			else 
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/cloud-internet-protection';
		}	else if ( ($("#menuSelectEnterpriseSlide").val()==4) ){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/cloud-email-protection';
			else 
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/cloud-email-protection';
		}	else if ( ($("#menuSelectEnterpriseSlide").val()==5) ){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/enterprise-business';
			else 
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/enterprise-business';
		}	else if ( ($("#menuSelectEnterpriseSlide").val()==6) ){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/business-with-exchange';
			else 
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/business-with-exchange';
		}	else if ( ($("#menuSelectEnterpriseSlide").val()==7) ){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/desktops';
			else 
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/desktops';
		}	else if ( ($("#menuSelectEnterpriseSlide").val()==8) ){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/file-servers';
			else 
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/file-servers';
		}	else if ( ($("#menuSelectEnterpriseSlide").val()==9) ){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/gatedefender-performa';
			else 
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/gatedefender-performa';
		}	else if ( ($("#menuSelectEnterpriseSlide").val()==10) ){
			if($("#language").val()==1)
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/gatedefender-integra';
			else 
				window.location = 'http://www.pandasecurity.com/spain/enterprise/support/gatedefender-integra';
		}	
	});	

	
	
		//Home SLIDER
	//Show the paging and activate its first link
//$(".paging").show();
$(".paging a:first").next().addClass("active");

//Get size of the image, how many images there are, then determin the size of the image reel.
if ($(".windowPartners").length > 0){
	var imageWidth = $(".windowPartners").width();

}else{
	var imageWidth = $(".window").width();
	}

var imageSum = $(".image_reel img").size();
var imageReelWidth = imageWidth * imageSum;
$active = $('.paging a:first').next(); //go back to first
//Adjust the image reel to its new size
$(".image_reel").css({'width' : imageReelWidth});

//Paging  and Slider Function
rotate = function(){
    var triggerID = $active.attr("rel") - 1; //Get number of times to slide
    var image_reelPosition = triggerID * imageWidth; //Determines the distance the image reel needs to slide

    $(".paging div").removeClass('selectedBullet'); //Remove all active class
    $active.parent().parent().addClass('selectedBullet'); //Add active class (the $active is declared in the rotateSwitch function)
	/*$(".paging li").removeClass('selected'); //Remove all active class
    $active.parent().addClass('selected'); //Add active class (the $active is declared in the rotateSwitch function)*/
	 $(".paging a").removeClass('active'); //Remove all active class
    $active.addClass('active'); //Add active class (the $active is declared in the 

	 $(".paging2 a").removeClass('active'); //Remove all active class
    $active2.addClass('active'); //Add active class (the $active is declared in the 


    //Slider Animation	
	 $(".image_reel").animate({
        left: -image_reelPosition
    }, 1000 );

}; 

//Rotation  and Timing Event
rotateSwitch = function(){


	
    play = setInterval(function(){ //Set timer - this will repeat itself every 7 seconds
		//var list = $(".paging").find("a");
		exist = $('.paging a.active').attr("class") ? $('.paging a.active').attr("class") : false;
		if(exist!= false)
	        $active2 = $('.paging2 .'+$('.paging a.active').attr("class").substring(0,1)).next(); //Move to the next paging	
		else
			$active2 = false;
		
		exist = $active2 ? $active2 : false;
		if(exist!= false)
			$active = $('.paging .'+$active2.attr("class")); //Move to the next paging
		else
			$active=false;
		/*$.each(list,function(index,value){								 
			if(list[index].getAttribute("rel")==$('.paging a.active').attr("rel")){	
				if(list[index+1].getAttribute("rel")==$('.paging a.active').attr("rel")){
					$active =list[index+2];
				}else{
					$active =list[index+1];
				}
//				alert(index+"-"+list[index].getAttribute("rel")+"-"+$('.paging a.active').attr("rel"));
			}
		});*/
		//$active = $('.paging a.active').next(); //Move to the next paging	
		 if ( $active.length === 0) { //If paging reaches the end...
            $active = $('.paging a:first').next(); //go back to first
        }
        if ( $active2.length === 0) { //If paging reaches the end...
            $active2 = $('.paging2 a:first'); //go back to first
        }
		if($active != false)
	        rotate(); //Trigger the paging and slider function
    }, 5000); //Timer speed in milliseconds (7 seconds)
};
/*rotateSwitch = function(){
   
        $active = $('.paging a.active').next(); //Move to the next paging
        if ( $active.length === 0) { //If paging reaches the end...
            $active = $('.paging a:first'); //go back to first
        }
        rotate(); //Trigger the paging and slider function
   
};*/

rotateSwitch(); //Run function on launch

//On Hover
$(".image_reel a").hover(function() {
    clearInterval(play); //Stop the rotation
}, function() {
    rotateSwitch(); //Resume rotation timer
});	


//On Click
$(".paging a").click(function() {
	  if($(this).attr("class")=="fin"){
		   // $active = $(this); //Activate the clicked paging
			if (( $active.next().attr("class") == "fin") || ( $active.next().attr("class") == "previous")) { //If paging reaches the end...
				 $active = $('.paging a:first').next(); //go back to first   
			}else{
				$active = $active.next(); //Activate the clicked paging
			}
			$active2 = $('.paging2 .'+$active.attr("class")); //Activate the clicked paging
	  }else if($(this).attr("class")=="previous"){
		  if (( $active.prev().attr("class") == "fin") || ( $active.prev().attr("class") == "previous")) { //If paging reaches the end...
				 $active = $('.paging a:last').prev(); //go back to first   
			}else{
				$active = $active.prev(); 
			}
			$active2 = $('.paging2 .'+$active.attr("class")); 
	}else{
			$active=$(this);
			$active2 = $('.paging2 .'+$active.attr("class")); 
	}
	//Reset Timer	
    clearInterval(play); //Stop the rotation
    rotate(); //Trigger rotation immediately
    rotateSwitch(); // Resume rotation timer
    return false; //Prevent browser jump to link anchor

}); 


		//END Home SLIDER			

	
	/*Product Detail*/
	/*$("#mainLeftDetail #renewMenu").hide();	*/
	$("#mainLeftDetail #updateMenu").hide();		
	$("#mainLeftDown #tabContentMinimum").hide();	
	$("#mainLeftDown #tabVideo").hide();		
	
	var lis2=$("#buyDetailTapMenu").find("li");//Elements li of the tab menu
	var divs2=$("#mainLeftDetail .tabs2");//Divs with the content of each tab section
//Product detail Page. Functionality of the tabMenu
	$("#buyDetailTapMenu li").mousedown(function() {
		  $idActual=$(this).attr("id");	
		  //Change the style of the selected and deselected tabs
		  $("#buyDetailTapMenu li a").removeClass("selected");
		  $("#buyDetailTapMenu li a").addClass("tab");
		  $(this).find("a").removeClass();	  
		  $(this).find("a").addClass("selected");	
		  
		  //Find the index of the selected tab. Show the div with the same index and hide the others
		  $key=0;
		  $.each(lis2,function(index,value){	
			if(lis2[index].id==$idActual){
				$key=index;	
			}
		});
		$.each(divs2,function(index,value){		
			if(index==$key){	
				$('#'+divs2[index].id).fadeIn("slow");	
			}else{
				$('#'+divs2[index].id).hide();	
			}
		});
	
	});	
	$("#buyDetailTapMenu .radio").mousedown(function() {
		$(this).children().children("input").attr("checked", "checked"); 
		$("#buyDetailTapMenu .radioActive").addClass("radio").removeClass("radioActive");
		$(this).addClass("radioActive");	
	});		
	/*END Product Detail*/
	
		//Beta product Zone. Change box menu styles
	$("#mainLeftBeta  #boxMenu .characteristics").mousedown(function() {			
		$("#mainLeftBeta  #boxMenu #menuSelect").removeClass();
		$("#mainLeftBeta  #boxMenu #menuSelect").addClass("menuCharacteristics");	
		
		$("#mainLeftBeta  #boxMenu #menuSelect li a").removeClass("selected");
		$("#mainLeftBeta  #boxMenu #menuSelect li a").addClass("tab");
		$(this).find("a").removeClass();	  
		$(this).find("a").addClass("selected");	
		$("#mainLeftBeta #box #characteristics").show();
		$("#mainLeftBeta #box #technical").hide();
		$("#mainLeftBeta #box #services").hide();		
		
	});	
		$("#mainLeftBeta  #boxMenu .technical").mousedown(function() {			
		$("#mainLeftBeta  #boxMenu #menuSelect li a").removeClass("selected");
		$("#mainLeftBeta  #boxMenu #menuSelect li a").addClass("tab");
		$(this).find("a").removeClass();	  
		$(this).find("a").addClass("selected");																	   
		$("#mainLeftBeta  #boxMenu #menuSelect").removeClass();
		$("#mainLeftBeta  #boxMenu #menuSelect").addClass("menuTechnical");	
		$("#mainLeftBeta #box #characteristics").hide();
		$("#mainLeftBeta #box #technical").show();
		$("#mainLeftBeta #box #services").hide();
		
	});	
	$("#mainLeftBeta  #boxMenu .services").mousedown(function() {	
		$("#mainLeftBeta  #boxMenu #menuSelect li a").removeClass("selected");
		$("#mainLeftBeta  #boxMenu #menuSelect li a").addClass("tab");
		$(this).find("a").removeClass();	  
		$(this).find("a").addClass("selected");																  
		$("#mainLeftBeta  #boxMenu #menuSelect").removeClass();
		$("#mainLeftBeta  #boxMenu #menuSelect").addClass("menuServices");	
		$("#mainLeftBeta #box #characteristics").hide();
		$("#mainLeftBeta #box #technical").hide();
		$("#mainLeftBeta #box #services").show();		
		
	});	

	//End beta product Zone

	//Time for your business
	  $(".tab").click(function () {
	  if(this.id.split("_")[1] == 1){
		  $("#tab_2_content").hide();
		  $("#tab_1_caption").removeClass("blur");
		  $("#tab_2_caption").addClass("blur");
		  if (typeof $("#tab_3_content") != "undefined"){
			  $("#tab_3_content").hide();
			  $("#tab_3_caption").addClass("blur");
		  }
	}else if(this.id.split("_")[1] == 2){
		 $("#tab_1_content").hide();
		 if (typeof $("#tab_3_content") != "undefined"){
			  $("#tab_3_content").hide();
			  $("#tab_3_caption").addClass("blur");
		  }
		  $("#tab_1_caption").addClass("blur");
		  $("#tab_2_caption").removeClass("blur");
		  $("#tab_2_caption").removeClass("blur2");
	}
	  else {
		  $("#tab_1_content").hide();
		  $("#tab_2_content").hide();
		  $("#tab_1_caption").addClass("blur");
		  $("#tab_2_caption").addClass("blur2");
		  $("#tab_3_caption").removeClass("blur");
		  };
		
      $("#" + this.id + "_content").show();
	  $("#" + this.id + "_content").css({ opacity:"0" });
	  if($("#" + this.id + "_content").css("opacity") == "0"){
		$("#" + this.id + "_content").animate({ opacity:"1" }, 500);
		  };
    });

	  


	//End Time for your business
	
	//Home Enterprise table expand-collapse behaviour
	$(".comparative-headline").click(function(event) {
        $(this).find(".table-details").toggle();
        
       
	});

	$(".botonexpand").click(function(event) {
			$(".table-details").show();			
			
	});
	
	$(".botoncontra").click(function(event) {
			$(".table-details").hide();		 
			
	});
	$("#menutab1").click(function(event) {
								  
			$("#tab1").show();	
			$("#tab2").hide();			
		  	$("#menutab2").removeClass("selected");
			$("#menutab2").addClass("noselected");
			$("#menutab1").removeClass("noselected");
			$("#menutab1").addClass("selected");
			
	});
	$("#menutab2").click(function(event) {
			$("#tab2").show();	
			$("#tab1").hide();
		  	$("#menutab1").removeClass("selected");
			$("#menutab1").addClass("noselected");
			$("#menutab2").removeClass("noselected");
			$("#menutab2").addClass("selected");			
			
	});
	
	/*$('#wrapper #homeEnterprise #tabtable table .header1').click(function() { 							
					$('#prueba').css('z-index',2000);
					$('#tab1').css('z-index',2000);
					setTimeout(function()
                        {
                               $.blockUI({ message: null,css: { width: '975px' },
								overlayCSS: { opacity: '0.85' }
							  }); 
					$.blockUI.defaults.css.cursor = 'hand'; 
					$('.blockOverlay').click($.unblockUI);
					return false; 
                        }, 10); 
				});    */ 
	//END Home Enterprise table expand-collapse behaviour        
	
	
	
	//ENTERPRISE product detail
/*
	var lis3=$("#mainLeft #detailTapMenu ").find("li");//Elements li of the tab menu
	var divs3=$("#mainLeft .tabs");//Divs with the content of each tab section
//Product detail Page. Functionality of the tabMenu
	$("#mainLeft #detailTapMenu li").mousedown(function() {
										alert("3");				
		  $idActual=$(this).attr("id");				  
		  //Find the index of the selected tab. Show the div with the same index and hide the others
		  $key=0;
		  $.each(lis3,function(index,value){	
			if(lis3[index].id==$idActual){
				$key=index;	
			}
		});
		$.each(divs3,function(index,value){						
			if(index==$key){
				$('#'+divs3[index].id).fadeIn("slow");	
			}else{
				
				$('#'+divs3[index].id).hide();	
			}
		});
	
	});	*/
	//Enterprise product detail
	
	
	function Tabs(){
	var array;
	array=location.href.split("#");
	
	if(array[1]=="why"){
		$("#menuCollective a").removeClass("selected");
		$("#menuCollective a").addClass("tab");	
		$("#menuWhy a").removeClass("tab");		
		$("#menuWhy a").addClass("selected");	
		$("#technologiesDown").hide();	
		$("#technologiesWhy").show();	
	}else{
		$("#menuWhy a").removeClass("selected");
		$("#menuWhy a").addClass("tab");	
		$("#menuCollective a").removeClass("tab");		
		$("#menuCollective a").addClass("selected");	
		$("#technologiesWhy").hide();	
		$("#technologiesDown").show();	
	}
}
	
Tabs();

						   		//Technologies why tab menu
	var lisW=$("#technologiesWhy #menuWhy div");//Elements div of the tab menu
	var divsW=$("#technologiesWhy .tabs");//Divs with the content of each tab section	
			
	
	//Product detail Page. Functionality of the tabMenu
	$("#technologiesWhy #menuWhy div").mousedown(function() {
												  
		  $idActual=$(this).attr("id");	
		  //Change the style of the selected and deselected tabs
		  $("#technologiesWhy #menuWhy div").removeClass("selected");
		 // $("#detailTapMenu  #menu div").addClass("tab");
		  $(this).removeClass();	  
		  $(this).addClass("selected");	
			  
		  //Find the index of the selected tab. Show the div with the same index and hide the others
//alert(lisW.length);
		  $key=0;
		  $.each(lisW,function(index,value){	
			if(lisW[index].id==$idActual){
				$key=index;	
						  
			}
		});
		$.each(divsW,function(index,value){						
			if(index==$key){	
				$('#'+divsW[index].id).fadeIn("slow");	
			}else{
				$('#'+divsW[index].id).hide();	
			}
		});
	
	});


/*ACTIVE SCAN MOVING LATERAL*/
	  			var feed_width = $('#feedback').width();
                var scr_w = screen.width; // Screen Width
                var btn_width = 60;
                var move_left = -(feed_width - btn_width);
                var slide_from_left = 0;
				var first=0;
				
				
                  positioningForm();

                   $('.left_btn').click(function(){
					if (first ==0){
	                    slideFromleft();
						first=1;
					}else{
						 var pos = $('#feedback').position();
						 if (pos!=null)
						{var ls = pos.left;
						moveLeft();
						first=0;}
					}
               	 });
                $('.feed_close').click(function(){
                    var pos =$('#feedback').position();
					if (pos!=null)
                    {var ls = pos.left;
					moveLeft();}
                
                });


function closeAS(){
	 var pos = $('#feedback').position();
	 if (pos!=null)
     {var ls = pos.left;
	 moveLeft();}
	}


                function positioningForm(){
					
			  // $('#feedback').css({"left": -(feed_width )+"px"}).show();
			// $('#feedback').css({"left": -(slide_from_left )+"px"}).show();
					 //$('.left_btn').show();
					 $('#feedback').animate({left: "-"+(feed_width - btn_width)+"px"},{duration:5000,easing: 'easeOutExpo'							});
							
                }           
                function slideFromleft(){
                    $('#feedback').animate({left: slide_from_left+"px"},{duration: 'slow',easing: 'easeOutExpo'});
                    
                }
                function moveLeft(){
                    $('#feedback').animate({left: move_left+"px"},{duration: 'slow',easing: 'easeOutExpo'});
                    $('.left_btn').show();
                }
            
/*ACTIVE SCAN MOVING LATERAL*/
	
	$("#buyDetailTapMenu .tabs2:first").show();
	$("#contenido .tabs:first").show();
	$("#contenido #detailTapMenu li a:first").removeClass("tab");
	$("#contenido #detailTapMenu li a:first").addClass("selected");	
	$("#mainLeftDetail #buyDetailTapMenu li a:first").removeClass("tab");
	$("#mainLeftDetail #buyDetailTapMenu li a:first").addClass("selected");		
});	
	